// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package jagex.client;

import java.awt.*;

// Referenced classes of package jagex.client:
//            k

public class GameFrame extends Frame {

	public GameFrame(GameWindow arg0, int arg1, int arg2, String arg3,
			boolean arg4, boolean arg5) {
		qc = 28;
		nc = arg1;
		oc = arg2;
		rc = arg0;
		if (arg5) {
			qc = 48;
		} else {
			qc = 28;
		}
		setTitle(arg3);
		setResizable(arg4);
		show();
		toFront();
		resize(nc, oc);
		sc = getGraphics();
	}

	public Graphics getGraphics() {
		Graphics g = super.getGraphics();
		if (pc == 0) {
			g.translate(0, 24);
		} else {
			g.translate(-5, 0);
		}
		return g;
	}

	public void resize(int arg0, int arg1) {
		super.resize(arg0, arg1 + qc);
	}

	public int o() {
		return size().width;
	}

	public int p() {
		return size().height - qc;
	}

	public boolean handleEvent(Event arg0) {
		if (arg0.id == 401) {
			rc.keyDown(arg0, arg0.key);
		} else if (arg0.id == 402) {
			rc.keyUp(arg0, arg0.key);
		} else if (arg0.id == 501) {
			rc.mouseDown(arg0, arg0.x, arg0.y - 24);
		} else if (arg0.id == 506) {
			rc.mouseDrag(arg0, arg0.x, arg0.y - 24);
		} else if (arg0.id == 502) {
			rc.mouseUp(arg0, arg0.x, arg0.y - 24);
		} else if (arg0.id == 503) {
			rc.mouseMove(arg0, arg0.x, arg0.y - 24);
		} else if (arg0.id == 201) {
			rc.destroy();
		} else if (arg0.id == 1001) {
			rc.action(arg0, arg0.target);
		} else if (arg0.id == 403) {
			rc.keyDown(arg0, arg0.key);
		} else if (arg0.id == 404) {
			rc.keyUp(arg0, arg0.key);
		}
		return true;
	}

	public final void paint(Graphics arg0) {
		rc.paint(arg0);
	}

	int nc;
	int oc;
	int pc;
	int qc;
	GameWindow rc;
	Graphics sc;
}
